<?php
/**
 * Created by PhpStorm.
 * User: kcj
 * Date: 2017/6/14
 * Time: 15:02
 */
define('TEXTSOCKET',"tcp://tp5.com:7273");
$client = stream_socket_client(TEXTSOCKET);
        if(!$client)exit("can not connect");
print_r(1231);
// 模拟超级用户，以文本协议发送数据，注意Text文本协议末尾有换行符（发送的数据中最好有能识别超级用户的字段），这样在Event.php中的onMessage方法中便能收到这个数据，然后做相应的处理即可
        fwrite($client, '{"type":"del","roomid":"2131","content":"1564561", "user":"admin", "pass":"******"}'."\n");